projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b4af24
)
Fix a crash on print preview
author
Carlos Garcia Campos
<carlosgc@gnome.org>
Sat, 19 Dec 2009 11:28:46 +0000
(12:28 +0100)
committer
Carlos Garcia Campos
<carlosgc@gnome.org>
Sat, 19 Dec 2009 11:28:46 +0000
(12:28 +0100)
There's no printer when doing print preview so it's not possible to get
its hard margins.
gtk/gtkprintoperation-unix.c
patch
|
blob
|
history
diff --git
a/gtk/gtkprintoperation-unix.c
b/gtk/gtkprintoperation-unix.c
index 4ac60de87919117b097660aae5b79bfd1c1ff038..f12ab01b373c805d47b62d75ed579ae1a506fd39 100644
(file)
--- a/
gtk/gtkprintoperation-unix.c
+++ b/
gtk/gtkprintoperation-unix.c
@@
-547,7
+547,7
@@
finish_print (PrintResponseData *rdata,
if (gtk_print_settings_get_number_up (settings) < 2)
{
- if (gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right))
+ if (
printer &&
gtk_printer_get_hard_margins (printer, &top, &bottom, &left, &right))
_gtk_print_context_set_hard_margins (priv->print_context, top, bottom, left, right);
}
else